<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="./animate.css">
	<script src="./vue.js"></script>
	<script src="./velocity.js"></script>
</head>
<style>
	.v-enter, .v-leave-to {opacity: 0}
	.v-enter-active, .v-leave-active {transition: opacity 1s;}
</style>
<body>
	<div id="root">
		<transition-group>
			<div v-for="item of list" key="item.id">{{item.title}}</div>
		</transition-group>
		<button @click="handleClick">添加</button>
	</div>
	
	<script>

		let count = 0;

		let vm = new Vue({
			el: '#root',
			data: {	
				list: []
			},
			methods: {
				handleClick () {
					this.list.push({
						id: count++,
						title: 'hello world'
					})
				}
			}
		})
	</script>
</body>
</html>